// 司机登录
import http from '@/common/request.js'

// 登录
export const login = (data) => {
	return http("/v1/ls/vehicle/info/login", data)
}

// 根据登录获取的token 获取用户信息
export const getInfo = () => {
	return http("/v1/sys/auth/getInfo", {}, true, {
		method: 'get'
	})
}

// 根据登录获取的token 获取用户信息
export const getDriveDetails = (id) => {
	return http("/v1/ls/vehicle/info/get", {
		id
	}, true, {
		method: 'get'
	})
}

// 获取list
export const getList = (data) => {
	return http("/v1/ls/vehicle/need/info/getDriverVehicleNeedInfo", data, true, {
		method: 'get'
	})
}

// 装车榜单
export const loadingConfirm = (data) => {
	return http("/v1/ls/vehicle/need/info/loading/confirm", data)
}
// 卸车榜单
export const unloadConfirm = (data) => {
	return http("v1/ls/vehicle/need/info/unload/confirm", data)
}

// 卸车后，编辑装车、卸车榜单 {还没接口}
export const unloadAfterEditConfirm = data => {
	return http("v1/ls/vehicle/need/info/app/edit/confirm", data)
}

// 确认到厂
export const factoryConfirm = (data) => {
	return http("/v1/ls/vehicle/need/info/factory/confirm", data)
}